package com.waverider.promotion.enums;

/**
 * 打折模式
 * @author sihai
 *
 */
public enum PromotionTypeEnum
{
	PROMOTION_TYPE_DISCOUNT(0, "打折"),
	PROMOTION_TYPE_REDUE_PRICE(1, "降价");
	
	private int value;
	private String desc;
	
	private PromotionTypeEnum(int value, String desc)
	{
		this.value = value;
		this.desc = desc;
	}
	
	public static PromotionTypeEnum toEnum(int value)
	{
		for(PromotionTypeEnum e : PromotionTypeEnum.values())
		{
			if(e.value == value)
			{
				return e;
			}
		}
		
		return null;
	}
	
	public int value()
	{
		return value;
	}
	
	public String desc()
	{
		return desc;
	}
}
